﻿// See https://aka.ms/new-console-template for more information
using Confluent.Kafka;
using Newtonsoft.Json;
using QskjDownUpAlarmVideoImage.Dto;
using QskjDownUpAlarmVideoImage.Service;
using System.Security.Policy;

Console.WriteLine("Hello, World!");
#region 下载证据上传证据到视图库
ParameterizedThreadStart threadStart1 = new((obj) =>
{
    Console.WriteLine(DateTime.Now + "____当日下载证据上传证据执行开始");
    //DownUpVideoImage.GetInfo();//下载证据上传证据
    while (true)
    {
        DownUpVideoImage.GetInfo();//下载证据上传证据
        Thread.Sleep(2000);
    }
});
Thread thread1 = new Thread(threadStart1);
thread1.Start();
ParameterizedThreadStart threadStart2 = new((obj) =>
{
    Console.WriteLine(DateTime.Now + "____昨日下载证据上传证据执行开始");
    //DownUpVideoImage.GetInfo();//下载证据上传证据
    while (true)
    {
        DownUpVideoImage.GetInfox(-1);//下载证据上传证据
        Thread.Sleep(500);
    }
});
Thread thread2 = new Thread(threadStart2);
thread2.Start();
ParameterizedThreadStart threadStart3 = new((obj) =>
{
    Console.WriteLine(DateTime.Now + "____前日下载证据上传证据执行开始");
    //DownUpVideoImage.GetInfo();//下载证据上传证据
    while (true)
    {
        DownUpVideoImage.GetInfox(-2);//下载证据上传证据
        Thread.Sleep(500);
    }
});
Thread thread3 = new Thread(threadStart3);
thread3.Start();
#endregion
while (true)
{
    Thread.Sleep(1000 * 60);
}
